package cn.xy

import org.slf4j.{Logger, LoggerFactory}

/**
  * Created by xiaoyuan on 2017/12/1.
  */
object Test1 {

  val log:Logger = LoggerFactory.getLogger(this.getClass);

  def main(args: Array[String]): Unit = {
    log.info("测试logback");
    //
    var resultMap: Map[String, List[Long]] = Map()
    resultMap+=("id1"->List(30L));
    resultMap += ("id1"->(resultMap("id1")++List(20L)));
    resultMap += ("id1"->(resultMap("id1")++List(100L)));

    resultMap+=("id2"->List(-20L));
    resultMap += ("id2"->(resultMap("id2")++List(36L)));
    resultMap += ("id2"->(resultMap("id2")++List(-1L)));
    resultMap += ("id2"->(resultMap("id2")++List(-100L)));
    resultMap += ("id2"->(resultMap("id2")++List(-50L)));


    for((k,v)<-resultMap){
      resultMap+=(k->v.sortWith(_>_))
    }
    println(resultMap)
  }
}
